Class_name = "CTurret"
object_name = "Turret_Bf110E2"

[COCKPIT_LIMITS]
x= -0.55, 0.35
y= -0.1, 0.1
z= -0.17, 0.17
[END]

[OPEN_COCKPIT_LIMITS]
x= -0.55, 0.35
y= -0.1, 0.1
z= -0.17, 0.17
[END]

VisualImage=0,"graphics/planes/Bf110E2/Bf110E2-C1-low.mgm",65
VisualImage=1,"graphics/planes/Bf110E2/Bf110E2-C1.mgm",false
KeepNetworkImages=true

//VisualImage=ID,model_or_effect,cast_shadows[,debris_effects]
//ID:					INT:	0 - visible everywhere, 1 - visible inside, 2 - visible outside
//model_or_effect:		STRING:	path to model file (mgm) of effect file (epl)
//cast_shadows: 		BOOL/INT:	cast shadows from object or not (cast_shadows=Attr1+Attr2+...+AttrN)
//						VIF_CASTSHADOWS=1,
//						VIF_BLENDMASKLAST=2,
//						VIF_ALWAYSONTOP=4,
//						VIF_FLATAMBIENT=8,
//						VIF_DONTCAST_COCKPIT_SHADOWS=16,
//						VIF_GRASS_CAPSULES=32,
//						VIF_COCKPIT_SHADOWS_OUTSIDE=64
//[,debris_effects]:	BOOL:	optional parameter, show effects on object debris or not

CollisionBody="graphics/planes/Bf110E2/Bf110E2-C1.col"

VisualRadius=2.0

mp_site=true

[attach=0]
	position = -0.9,-0.6,0
	object = "LuaScripts/WorldObjects/Bots/BotGunner_Bf110E2_GER41.txt"
	rotation= 0, 0, 0
[end]

[attach=1]
	position = 0.0, 0.0, 0.0
	object = "LuaScripts/WorldObjects/TurretRiffle.txt"
[end]

[attach=2]
	position = 0.0, 0.0, 0.0
	object = "LuaScripts/WorldObjects/TurretCamera.txt"
[end]

TargetingScript = "LuaScripts/WorldObjects/Ballistics/Projectiles/BULLET_GER_7-92x57_APsmk.bin"

SoundScript="LuaScripts/Sound/Planes/Bf110E2_T.cfg"

DropsArg=100
HumidityArg=101

SetCockpitArgs=true	// true -             , false -              

//CockpitArg= FetchType, CmdID, SubcmdID, ArgNum, ArgValDefault, SmoothingType, SmoothingPower, NetworkFlag
//FetchType=-1:       
//FetchType=-2:         
//FetchType=-3:          parent-
//FetchType>=0:          child-   Attach ID
//CmdID=[0..999]: ID    ,    .
//CmdID=[1000..1999]: ID    ,    .
//SubcmdID=[0..3]: ID     .
//SubcmdID=[0..1]: ID     .
//ArgNum:     / .
//ArgValDefault:      ,    .
//SmoothingType: smooth_clamp -  - 
//SmoothingType: smooth_wrap -   
//SmoothingPower:   
//NetworkFlag="":           ,  SetCockpitArgs=false
//NetworkFlag="low_freq":     ,       ,    
//NetworkFlag="med_freq":     ,       ,    
//NetworkFlag="high_freq":     ,       ,    
//NetworkFlag="granted_single":     ,       ,     

CockpitArg = -3, 0500, 2, 22062, 0.0, "smooth_clamp", 0.0, "" // /  

CockpitArg = -3, 0434, 0, 06009, 0.0, "smooth_clamp", 0.2, "" //    ("")
CockpitArg = -3, 0434, 1, 06010, 0.0, "smooth_clamp", 0.2, "" //   
CockpitArg = -3, 0434, 3, 06012, 0.0, "smooth_clamp", 0.2, "" //   

CockpitArg = -2, 0000, 0, 9019, 0.0, "smooth_clamp", 0.0, "granted_single" //     
CockpitArg = -2, 0001, 0, 9018, 0.0, "smooth_clamp", 0.5, "med_freq" //     


[TurretsPos=0]
	position = 0.0, 0.0464, 0.0
	PosMoveArg = 21000
	SeatArg=22111
	SeatUpTime=2.0
	SeatDownTime=2.0

	ReloadDelay = 0.3
	BotRotaionValueZ = 0.0
	LegsParameter = 0.0
	BotMinFirstAngle  = -90
	BotMaxFirstAngle  = 90
	BotMinSecondAngle = -90
	BotMaxSecondAngle = 90
	FirstToSecondInterp = 0.0
	
	LockTurretCamera=false
	
	// Joints in orientation order!!!

	[Joint=0]
		SectorAngleMin = -25.0
		SectorAngleMax = 25.0
		DefaultPos = 0.94

		AngularSpeed   = 120.0

		AnimationArgMin = 0.361111
		AnimationArgMax = 0.638889

		AnimationArgNum = 21006

		Point = -0.0237,0.0964,0
		Axis  = 0.0,1.0,0.0

		SoundNumber = 1
	[end]

	[Joint=1]
		SectorAngleMin = -60.0
		SectorAngleMax = 2.0
		DefaultPos = 0.6290323
		
		AngularSpeed = 120.0
		
		AnimationArgMin = 0.166667
		AnimationArgMax = 0.511111

		AnimationArgNum = 21007
		
		Point = 0, 0, 0
		Axis  = 0.0,0.0,1.0

		SoundNumber = 2

		NoMoveFar=true	// Block rotation when the target is in the rear henisphere
	[end]

	[GunAnimation=0]
		FireArg = 9013
	[end]

	FireLightArg=60220

	relativeBotStand = 0.0, 0.0, 0.0
	relativeBotSit = 0.0, 0.0, 0.0
	relativeBotDead = 0.0, 0.0, 0.0
	TransitionStandPower = 1
	TransitionDeadPower = 1

	BotAttachJointId = 0
	BotFirstAnimJointId = 1
	BotSecondAnimJointId  = 0

	SightPosition = 0.0, 0.5, 0.0

	defaultDirection = 1.0, 0.383864, 0.404026
	AimSector=-25, 25, -5, 60	//AI aim limits: left, right, down, up

	CamDisplacement = -0.45, 0.146351, 0.0

[end]

[TurretsGun=0]
	LinkedTurretPos = 0
//	Convex = "gun0"
	DGroup="MachineGun"
	DamageProp = 0.25

	Displacement = 0.518,0.0,0
	GunsightPosition = -0.45, 0.146351, 0.0
	ParallaxDistance = 400.0

	GunType = "LuaScripts/WorldObjects/Weapons/MG_GER_MG15.txt"

	ReLoadingStagesTime = 1.0, 3.0, 1.0, 0.3
 
	ReservedMagazinesArgIdx = 9019
	FlashAnimationArgIdx = 9013
	TriggerPositionArgIdx = 9001
	RoundsInMagazineArgIdx = 9011
	AmmunitionMovingArgIdx = 0			// not used
	HideAmmunitionArgIdx = 0			// not used
	ReLoadingArgIdx = 9018
	AzimuthDeviationArgIdx = 9006
	ElevationDeviationArgIdx = 9007
	FiringPinPositionArgIdx = 9003
	DrawAnimationArgIdx = 0, 9005

	BarrelTemperatureDecreaseCorrectionData = 1.0, 4.0, 300.0 //         :
	//   -        , [.], (>=0), default = 1
	//   -        ,       ,   , [.], (>=  ),  : 1.0
	//   -      ,              , [/], (>=0),  : 0.0

	CarriageAdditionalBulletDispertionAngle = 0.0252, 0.0706 //     ()     ,      :
	//   -        , [], (>=0)
	//   -          , [], (>=  )

	NumOfAnimations = 4

//	BushCoord = -0.114461, 0.0436303, -0.0287316
//	BushSpeed = 0.944, -0.096, -0.316

//	BushConfig = "LuaScripts/WorldObjects/Trash/Batch_case07-08mm.txt"

	SoundNumber = 1
[end]

[Ammunition0]
	GunAmmunition0=0
[end]
[GunAmmunition0]
	MaxRoundsInMagazine = 75
	RoundsInMagazine = 75
	MaxReservedMagazines = 10
	ReservedMagazines = 10
	MaxMisFiresInMagazine = 0
	AmountRoundsWithOneTracer = 4
	ParallaxConfig="LuaScripts/WorldObjects/Ballistics/Projectiles/BULLET_GER_7-92x57_APsmk.bin"
	BulletConfig = "LuaScripts/WorldObjects/Ballistics/Projectiles/BULLET_GER_7-92x57_APsmk.txt"
[end]

SightPos = 0.0, 0.2, 0.0
PositionChangeTime = 1.0
StandDuration = 1.0
SitDuration = 1.0
PreEjectDuration = 1.0

//   ,         
//SectorLimits = -180.0, -50.0,  -2.5,  +90.0

//   ,         
SectorLimits = -180.0, -35.0,  -5.0,  +90.0
SectorLimits = -35.0, -25.0,  -20.0,  +90.0
SectorLimits = -25.0, -17.0,  -25.0,  +90.0
SectorLimits = -17.0,  -10.0,  -29.0,  +90.0

[Entrance]
	EntrancePos= -0.9,-0.6,0
	EntranceRot= 0,0,0
	JumpDir=0,8,-1
[end]
[Entrance]
	EntrancePos= -0.9,-0.6,0
	EntranceRot= 0,0,0
	JumpDir=-2,6,1
	SelectorDir=0,2,0	//        2/
[end]
EjectOnlyAfterPreviousGunner = false

// Damage

CockpitSafetyRate = 0.35 //impact accelerations affect on bot treshold multiplifier (default is =1.0)

SphereHitProtection=0	//  /     

[SphereProtectionBoxOpen]	//    ,        ,   ,     SphereHitProtection=
	FovH=90					//          ,     ,  ArmorFront
	FovV=90					//          ,     ,  ArmorFront
							//  5        
	ArmorFront=9
	ArmorBack=9
	ArmorTop=0
	ArmorBottom=6
	ArmorRight=0
	ArmorLeft=0
[end]

[SphereProtectionBoxClose]	//    ,        ,   ,     SphereHitProtection=
	FovH=90					//          ,     ,  ArmorFront
	FovV=90					//          ,     ,  ArmorFront
							//  5        
	ArmorFront=9
	ArmorBack=9
	ArmorTop=2
	ArmorBottom=6
	ArmorRight=2
	ArmorLeft=2
[end]

Armor=0
LifeRate=50000
LifeRateFrag=5000 
Firing=0.0 

energyloss="",true,0.7,1000 //     , true -       -,       ,        
energyloss="gun0",true,5.0,20000 // 

[DGroup=MachineGun]
	IsCritical=false
	LifeK=20
	convex="gun0",5,600,"MT_ARMOR"
	[SphereHitArmorBox]
		FovH=90
		FovV=90
		ArmorFront=5
		ArmorBack=15
		ArmorTop=5
		ArmorBottom=7
		ArmorRight=5
		ArmorLeft=5
	[end]
	LifeRateFrag=600
	RepairSpeed=0.0166667	// (1 )
	RepairSource=4
	InstantRepair=true
[end]

OpenCockpitArg=22101
canopyLockSoundMask=9 	// 0 bit - canopy unlock, start
						// 1 bit - canopy unlock, end
						// 2 bit - canopy lock, start
						// 3 bit - canopy lock, end
NoAimingWhenOpened=false

AttackDistance   = 1500.0		//AI max aim distance versus ground point
AttackDistanceTrgGnd = 1500.0	//AI max aim distance versus ground target
AttackDistanceTrgAir = 1200.0		//AI max aim distance versus air target

AIStartAimErrModifier = 0.1		//Modifier for AI initial bracketing aim error (reduced twice with each shot)

AIAimDelayModifier = 0.1		//Modifier for AI delay before start to aim to a new target at 1000m range

ReArmTime=15 //  60,     -2  2 
